package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DCoupontypeMapper;
import com.ruoyi.system.domain.DCoupontype;
import com.ruoyi.system.service.IDCoupontypeService;

/**
 * 优惠卷类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-18
 */
@Service
public class DCoupontypeServiceImpl implements IDCoupontypeService 
{
    @Autowired
    private DCoupontypeMapper dCoupontypeMapper;

    /**
     * 查询优惠卷类型
     * 
     * @param cid 优惠卷类型主键
     * @return 优惠卷类型
     */
    @Override
    public DCoupontype selectDCoupontypeByCid(Long cid)
    {
        return dCoupontypeMapper.selectDCoupontypeByCid(cid);
    }

    /**
     * 查询优惠卷类型列表
     * 
     * @param dCoupontype 优惠卷类型
     * @return 优惠卷类型
     */
    @Override
    public List<DCoupontype> selectDCoupontypeList(DCoupontype dCoupontype)
    {
        return dCoupontypeMapper.selectDCoupontypeList(dCoupontype);
    }

    /**
     * 新增优惠卷类型
     * 
     * @param dCoupontype 优惠卷类型
     * @return 结果
     */
    @Override
    public int insertDCoupontype(DCoupontype dCoupontype)
    {
        return dCoupontypeMapper.insertDCoupontype(dCoupontype);
    }

    /**
     * 修改优惠卷类型
     * 
     * @param dCoupontype 优惠卷类型
     * @return 结果
     */
    @Override
    public int updateDCoupontype(DCoupontype dCoupontype)
    {
        return dCoupontypeMapper.updateDCoupontype(dCoupontype);
    }

    /**
     * 批量删除优惠卷类型
     * 
     * @param cids 需要删除的优惠卷类型主键
     * @return 结果
     */
    @Override
    public int deleteDCoupontypeByCids(Long[] cids)
    {
        return dCoupontypeMapper.deleteDCoupontypeByCids(cids);
    }

    /**
     * 删除优惠卷类型信息
     * 
     * @param cid 优惠卷类型主键
     * @return 结果
     */
    @Override
    public int deleteDCoupontypeByCid(Long cid)
    {
        return dCoupontypeMapper.deleteDCoupontypeByCid(cid);
    }
}
